package com.demo.entity.enums;


public enum ApplyStatusEnum {

    WATINGCHECK(0, "待审批"),
    ACCESS(1, "已通过"),
    REJECTED(2,"已拒绝"),
    RETURNED(3,"已归还"),
    OVERDUE(4,"逾期未还"),
    CANCELED(5,"取消");


    private Integer status;
    private String desc;

    ApplyStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static ApplyStatusEnum getByStatus(Integer status) {
        for (ApplyStatusEnum item : ApplyStatusEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
